﻿using Appliaction.IAppServices.Base_Manage;
using Domain.Entitys.Base_Manage;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace API.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class JurisdictionController : ControllerBase
    {
        private readonly IJurisdictionService jurisdictionService;

        public JurisdictionController(IJurisdictionService jurisdictionService)
        {
            this.jurisdictionService = jurisdictionService;
        }

        [HttpGet]
        //[Authorize]
        public List<Trees> GetJurisdictions(int rolesId)
        {
            return jurisdictionService.GetJurisdictions(rolesId);
        }
    }
}
